package com.example.myndklearn

import java.util.Date
import java.util.Random

//
class MainNative {


    var key = "我的"

    var human: Human = Man()

    val globalString: String
        external get

    external fun stringFromJNI(): String

    external fun chaneStaticIntValue()

    external fun handleBooleanFromJNI(): Boolean

    external fun assessMethod()

    external fun callHumanSyaHi()

    external fun accessConstructor(): Date

    external fun handleArray(array: IntArray)

    external fun getIntArray(len: Int): IntArray


    external fun createGlobalString()

    external fun deleteGlobalString()

    external fun createWeakGlobalString()

    external fun cryptFile(normalFilePath: String, cryptFilePath: String): String

    external fun decryptFile(cryptFilePath: String, decryptFilePath: String): String

    fun handleKeyValue(max: Int) {
        keyValue = Random().nextInt(max)
    }

    companion object {

        var keyValue = 10


        init {
            System.loadLibrary("native-lib")
        }
    }


}
